<?php if (!defined('THINK_PATH')) exit();?><!--<meta http-equiv="refresh" content="1"/>-->
<link href="/Public/Admin/css/same.css"  type="text/css" rel="stylesheet"/>
<script src="/Public/js/jquery-1.11.3.min.js" type="text/javascript"></script>
<link href="/Public/css/bootstrap.css"  type="text/css" rel="stylesheet"/>
<script src="/Public/js/bootstrap.js" type="text/javascript"></script>
<script src="/Public/js/layer/layer.js" type="text/javascript"></script>
<script src="/Public/Admin/js/BookEntering.js" type="text/javascript"></script>
<div class="a-main-left-content">
    <div class="a_con_title">
        <h4>书籍录入</h4>
    </div>
    <div class="a_title_tip">
        <img class="a_record_icon" src="/Public/img/record_01.jpg"/>
        <span class="a_record_news">请认真核对数据，以免出现问题。</span>
    </div>

    <div class="enter_box">
        <form action="<?php echo U('Admin/BookManage/bookEnterAdd');?>" method="post">
            <div class="enter_min_box">
                <div class="enter_span">
                    <span><c>*</c>图书名称：</span>
                </div>
                <div class="enter_input">
                    <input type="text" name="book_name" id="book_name">
                    <button type="button" id="enter_create1" class="check">名称校验</button>
                    <input type="hidden" value="<?php echo U('Admin/BookManage/getBookNamecheck');?>" id="check-url">
                </div>
            </div>
            <div class="enter_min_box">
                <div class="enter_span">
                    <span>图书类型：</span>
                </div>
                <select name="book_type_id">
                    <?php if(is_array($_getBookTypeTableInfo)): $i = 0; $__LIST__ = $_getBookTypeTableInfo;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><option value="<?php echo ($vo['book_type_id']); ?>"><?php echo ($vo['book_type_name']); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
                </select>
            </div>
            <div class="enter_min_box">
                <div class="enter_span">
                    <span>出版社：</span>
                </div>
                <select name="book_isbn_id">
                    <?php if(is_array($_getBookIsbnTableInfo)): $i = 0; $__LIST__ = $_getBookIsbnTableInfo;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$fo): $mod = ($i % 2 );++$i;?><option value="<?php echo ($fo['book_isbn_id']); ?>"><?php echo ($fo['book_isbn_name']); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
                </select>
            </div>
            <div class="enter_min_box">
                <div class="enter_span">
                    <span>书架名称：</span>
                </div>
                <select name="book_case_id">
                    <?php if(is_array($_getBookCaseTableInfo)): $i = 0; $__LIST__ = $_getBookCaseTableInfo;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$zo): $mod = ($i % 2 );++$i;?><option value="<?php echo ($zo['book_case_id']); ?>"><?php echo ($zo['book_case_name']); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
                </select>
            </div>
            <div class="enter_min_box" >
                <div class="enter_span">
                    <span><c>*</c>条形码：</span>
                </div>
                <input type="text" name="book_barcode" readonly="" value="" class="record_save_color" id="input_create">
                <button type="button" id="enter_create" onclick="randomkeys()">随机生成</button>
            </div>
            <div class="enter_min_box">
                <div class="enter_span">
                    <span><c>*</c>图书作者：</span>
                </div>
                <input type="text" name="book_author">
            </div>
            <div class="enter_min_box">
                <div class="enter_span">
                    <span>图书翻译者：</span>
                </div>
                <input type="text" name="book_translator">
            </div>
            <div class="enter_min_box">
                <div class="enter_span">
                    <span><c>*</c>图书价格：</span>
                </div>
                <input type="text" name="book_price"  onkeyup="value=value.replace(/[^\d{1,}\.\d{1,}|\d{1,}]/g,'')">
                <span>(单位：元)</span>
            </div>
            <div class="enter_min_box">
                <div class="enter_span">
                    <span><c>*</c>录入数量：</span>
                </div>
                <input type="text" name="book_number" onkeyup="value=this.value.replace(/\D+/g,'')">
                <span>(单位：本)</span>
            </div>
            <div class="table-submit1 enter_submit">
                <input type="submit" value="提&nbsp;交">
            </div>
        </form>
    </div>
</div>
<script type="text/javascript">
    function randomkeys(){
        var rnd="";
        for(var i=0;i<4;i++){
            rnd+=Math.floor(Math.random()*1000000).toString(16);
        }
        document.getElementById('input_create').value=rnd;
    }
</script>